Skip to content

ci: use common vcpkg setup script for Windows CI - #4644

Open
lidavidm wants to merge 2 commits into
apache:mainfrom
lidavidm:gh-3825
Open

ci: use common vcpkg setup script for Windows CI#4644
lidavidm wants to merge 2 commits into
apache:mainfrom
lidavidm:gh-3825

Conversation

@lidavidm

@lidavidm lidavidm commented Aug 4, 2026

Copy link
Copy Markdown
Member

Closes #3825.

Assisted-by: GPT-5.6 Sol codex@openai.com

@lidavidm
lidavidm marked this pull request as ready for review August 4, 2026 02:42
@lidavidm
lidavidm requested review from kou and zeroshade as code owners August 4, 2026 02:42
@lidavidm
lidavidm requested a review from amoeba August 4, 2026 02:43

@amoeba amoeba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Could we do a bit of cleanup to simplify areas in CI where we duplicate the logic of parsing the vcpkg version from .env? And also try this for the python-windows job in `packaging.yml'?

diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml
index 1eea72513..2867e1a4d 100644
--- a/.github/workflows/java.yml
+++ b/.github/workflows/java.yml
@@ -127,13 +127,12 @@ jobs:
           cache: "maven"
           distribution: "temurin"
           java-version: 11
-      - name: Retrieve Go, VCPKG version from .env
+      - name: Retrieve Go version from .env
         run: |
           (. .env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV
-          (. .env && echo "VCPKG_VERSION=${VCPKG}") >> $GITHUB_ENV
       - name: Install vcpkg
         run: |
-          ./ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
+          ./ci/scripts/install_vcpkg.sh $VCPKG_ROOT
       - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
         with:
           go-version: "${{ env.GO_VERSION }}"
diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml
index 77a876371..091d5532c 100644
--- a/.github/workflows/packaging.yml
+++ b/.github/workflows/packaging.yml
@@ -810,18 +810,10 @@ jobs:
       - name: Install Homebrew dependencies
         run: brew install autoconf bash pkg-config ninja
 
-      - name: Retrieve VCPKG version from .env
-        id: vcpkg_version
-        run: |
-          pushd adbc
-          vcpkg_version=$(cat ".env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"')
-          echo "VCPKG_VERSION=$vcpkg_version" | tee -a "$GITHUB_ENV"
-          popd
-
       - name: Install vcpkg
         run: |
           pushd adbc
-          ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
+          ci/scripts/install_vcpkg.sh $VCPKG_ROOT
           popd
 
       - name: Get required Go version
@@ -953,7 +945,7 @@ jobs:
     env:
       PYTHON_VERSION: "${{ matrix.python_version }}"
       # Where to install vcpkg
-      VCPKG_ROOT: "${{ github.workspace }}\\vcpkg"
+      VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
     steps:
       - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
         with:
@@ -990,21 +982,11 @@ jobs:
           choco install --no-progress -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
           choco install --no-progress -y visualcpp-build-tools
 
-      - name: Retrieve VCPKG version from .env
-        shell: pwsh
-        run: |
-          pushd adbc
-          Select-String -Path .env -Pattern 'VCPKG="(.+)"' | % {"VCPKG_VERSION=$($_.matches.groups[1])"} >> $env:GITHUB_ENV
-          popd
-
       - name: Install vcpkg
-        shell: pwsh
+        shell: bash
         run: |
-          echo $env:VCPKG_VERSION
-          git clone --shallow-since=2024-06-01 https://github.com/microsoft/vcpkg $env:VCPKG_ROOT
-          pushd $env:VCPKG_ROOT
-          .\bootstrap-vcpkg.bat -disableMetrics
-          popd
+          cd adbc
+          ci/scripts/install_vcpkg.sh "$VCPKG_ROOT"
 
       - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
         with:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Use same version of vcpkg in Windows and other CI

2 participants